/***************************firefoxupdater.h*********************************/
/*****************************************************************************/
/*******************Browsers Daily Build Updater************************/
/************Copyright (C) 2010-2011  Gianluigi Biancucci*************/
/*****************************************************************************/
/*****This is free software, and you are welcome to redistribute it****/
/*****and / or modify underthe terms of GPLV2 License.**************/
/*****This program comes with ABSOLUTELY NO WARRANTY*****/
/*****************************************************************************/

#ifndef FIREFOXUPDATER_H
#define FIREFOXUPDATER_H

#include <QMainWindow>
#include "singletondownloader.h"
#include <QFile>
#include <QMessageBox>
#include <QProcess>
#include "IBrowserUpdater.h"
#include <QDir>
class FirefoxUpdater : public IBrowserUpdater
{
    Q_OBJECT

public:
    explicit FirefoxUpdater(QString arch, QString installPath);

public slots:
    bool getLatestVersion(QString * lastVer);
    bool getInstalledVersion(QString * installedVer);
    bool downloadLatest(QString * exePath);
    bool checkInstallPath();
    QString getBrowserName();
    QString getLastError();
bool install(QString exePath);

private:
void setArch(QString arch);

    QString getContentBetween(QString source, QString startStr, QString endStr);
    SingletonDownloader* downloader;
    QString BName;
    QString lastError;
    QFile* check64;
    QFile* check32;
    QString _32;
    QString _64;
    QString currOsType;
    QString brenchNum;
    QDir currPath;

};

#endif // FIREFOXUPDATER_H
